-
Notifications
You must be signed in to change notification settings - Fork 1
tracer: load initial maps from /proc/<pid>/maps
#655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
this struct tracks threads within a single process; the old name conflated this with its use in an array in `struct memory_maps` to track multiple processes
| None => None, | ||
| Some(overlap) => Some(( | ||
| Self::from_bounds(self.start, overlap.start), | ||
| Self::from_bounds(self.end(), overlap.end()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
won't this always return None, if self.end() >= overlap.end() (given the ordering of the args), and is that a problem?
| struct memory_map *load_initial_memory_map(pid_t pid) { | ||
| char *filename = NULL; | ||
| asprintf(&filename, "/proc/%d/maps", pid); | ||
| FILE *maps_file = fopen(filename, "r"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this ever closed?
|
Maybe not directly related to this PR, but I was looking through the track memory map given your hang issues, and noted that I didn't see handling in the syscall-exit path for WAIT_GROUP_STOP, WAIT_SIGSEGV, WAIT_SIGNALED, WAIT_CONT, and WAIT_PTRACE_FORK. Hopefully this helps. I wonder about the last one and if that's the one that's causing the hangs |
Fixes #315. That said, this is atop #595 which causes problems as I haven't finished debugging the tracer's hangs.